using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using AandEDLL.DataAccess.Visit;


namespace AandEDLL.DataAccess
{
    [DataObject(true)]
    public class User: Visitable
    {
        private int userID;
        [DataObjectFieldAttribute(true, true, false)]
        public int UserID
        {
            get { return userID; }
            set { userID = value; }
        }

        private string userName;
        [DataObjectFieldAttribute(false, false, false, 50)]
        public string UserName
        {
            get { return userName; }
            set { userName = value; }
        }

        private string password;
        [DataObjectFieldAttribute(false, false, false, 50)]
        public string Password
        {
            get { return password; }
            set { password = value; }
        }

        private DateTime lastLoginDate;
        [DataObjectFieldAttribute(false, false, true)]
        public DateTime LastLoginDate
        {
            get { return lastLoginDate; }
            set { lastLoginDate = value; }
        }

        private bool admin;
        [DataObjectFieldAttribute(false, false, false)]
        public bool Admin
        {
            get { return admin; }
            set { admin = value; }
        }

        public void accept(Visitor visitor)
        {
            visitor.visit(this);
        }
    }
}
